package com.weslide.weslideapp.activity;

import com.weslide.weslideapp.R;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class WebSiteActivity extends WeSlideActivity {
	private WebView mWebView;

	@Override
	public void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentView(R.layout.page_website);
		String url = getIntent().getStringExtra("url");
		mWebView = (WebView) findViewById(R.id.page_website_mWbB);
		mWebView.setWebChromeClient(new WebChromeClient());
		mWebView.setWebViewClient(new WebViewClient());
		mWebView.loadUrl(url);
		mWebView.getSettings().setJavaScriptEnabled(true);
		mWebView.getSettings().setDomStorageEnabled(true);
		findViewById(R.id.page_website_mImgVBack).setOnClickListener(
				new OnClickListener() {

					@Override
					public void onClick(View v) {
						finish();
					}
				});
		findViewById(R.id.page_website_recordsmImgVPlus).setOnClickListener(
				new OnClickListener() {

					@Override
					public void onClick(View v) {
						Intent intent = new Intent(WebSiteActivity.this,
								MainActivity_de.class);
						intent.putExtra(MainActivity_de.EXTRA_IS_USERCENTER,
								false);
						intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
						WebSiteActivity.this.finish();
						WebSiteActivity.this.startActivity(intent);
					}
				});
	}
}
